import 'package:get/get.dart';
import 'package:getx_mvvm_lite/app/config/theme_config.dart';
import 'package:getx_mvvm_lite/core/network/api_client.dart';
import 'package:getx_mvvm_lite/features/todo/todo_repository.dart';

class InitialBinding extends Bindings {
  @override
  void dependencies() {
    // Config
    Get.put(ThemeConfig());

    // Network
    Get.put(ApiClient(baseUrl: ApiConfig.baseUrl));

    // Repositories
    Get.put<TodoRepository>(ApiTodoRepository(Get.find<ApiClient>()));
  }
}

class ApiConfig {
  static const baseUrl = 'https://jsonplaceholder.typicode.com';
}